package com.hudilao.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("orders")
public class Order {
    private static final long serialVersionUID = 1L;

    /**
     * 订单状态   0已提交未支付    1已支付    2已完成    3已评价   4已取消
     */
    public static final Integer SUBMITTED = 0;
    public static final Integer PAID = 1;
    public static final Integer FINISHED = 2;
    public static final Integer REVIEWED = 3;
    public static final Integer CANCELLED = 4;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private Long customerId;
    private Integer tableNumber;
    private BigDecimal amount;
    private Integer status;
    private Integer paymentMethod;                  //0余额  1微信
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;               //下单时间
    private LocalDateTime completeTime;

}
